x86/ucode/amd: Fix potential buffer overrun with equiv table handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Apr 2020 08:15:17 +0000 (10:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Apr 2020 08:15:17 +0000 (10:15 +0200)
commit09508fda40f08deed89e5f7e9f9b9744ff2bbeca
tree4e514841af638c5670a92bf14de7274293ecaa96
parentac3b39ce8386de5066760425e6895dc7735248a2
x86/ucode/amd: Fix potential buffer overrun with equiv table handling

find_equiv_cpu_id() loops until it finds a 0 installed_cpu entry.  Well formed
AMD microcode containers have this property.

Extend the checking in install_equiv_cpu_table() to reject tables which don't
have a sentinal at the end.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 1f97b6b9f1b5978659c5735954c37c130e7bb151
master date: 2020-03-27 13:13:26 +0000
xen/arch/x86/microcode_amd.c